//
//  City.m
//  NiuBanJin
//
//  Created by Billy on 15/11/12.
//  Copyright © 2015年 zzjr. All rights reserved.
//

#import "City.h"
#import "LMObjSerialization.h"

@implementation City

- (instancetype)initWithAttributes:(NSDictionary *)attributesDic  {
    
    if (self = [super init]) {
        
        self.city_id = [NSString stringWithFormat:@"%@",[attributesDic objectForKey:@"cityId"]];
        self.city_name = [attributesDic objectForKey:@"cityName"];
    }
    
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    
    self = [super init];
    
    if (self) {
        
        [LMObjSerialization decodeWithCoder:aDecoder obj:self];
    }
    
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    
    [LMObjSerialization encodeWithCoder:aCoder obj:self];
}

@end
